ListIterator

interface ListIterator<out T> : Iterator<T>

An iterator over a collection that supports indexed access.

See also

Functions

hasNext
Link copied to clipboard
abstract operator override fun hasNext(): Boolean
hasPrevious
Link copied to clipboard
abstract fun hasPrevious(): Boolean

Returns true if there are elements in the iteration before the current element.

next
Link copied to clipboard
abstract operator override fun next(): T
nextIndex
Link copied to clipboard
abstract fun nextIndex(): Int

Returns the index of the element that would be returned by a subsequent call to next.

previous
Link copied to clipboard
abstract fun previous(): T

Returns the previous element in the iteration and moves the cursor position backwards.

previousIndex
Link copied to clipboard
abstract fun previousIndex(): Int

Returns the index of the element that would be returned by a subsequent call to previous.

Inheritors

MutableListIterator
Link copied to clipboard